package com.itheima.web.controller.oms;


import com.itheima.service.oms.IOmsCompanyAddressService;
import com.itheima.utils.ResultData;
import com.itheima.vo.oms.OmsCompanyAddress;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 公司收发货地址表 前端控制器
 * </p>
 *
 * @author 王志斌
 * @since 2022-07-06
 */
@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {
   @DubboReference
    private IOmsCompanyAddressService companyAddressService;

    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public ResultData list() {
        List<OmsCompanyAddress> list = companyAddressService.selectlist();
        return ResultData.ok("",list);
    }
}
